<template>
  <div class="fillcontain">
    <breadCrumbs></breadCrumbs>
    <div class="table_container">
      <el-tabs v-model="messageTemplateActive" @tab-click="messageTemplateTabsClick">
        <el-tab-pane label="短信模版设置" name="1">
          <div class="search_box">
            <el-row :gutter="20">
              <el-col :md="8">
                <el-input v-model="searchInpt" placeholder="输入ID/昵称/手机号" clearable></el-input>
              </el-col>
              <el-col :md="4">
                <el-button type="primary" @click="searchFeedbackData()" icon="el-icon-search" :loading="searchLoading" plain>搜索</el-button>
              </el-col>
              <el-col :md="4">
              </el-col>
              <el-col :md="8">
              </el-col>
            </el-row>
          </div>
          <el-table v-loading="tableloading" :data="messageTemplateData" highlight-current-row style="width: 100%">
            <el-table-column property="index" label="id" align="center" fixed>
            </el-table-column>
            <el-table-column property="templateName" label="模版名称" align="center" fixed>
            </el-table-column>
            <el-table-column property="templateContext" label="模版内容" align="center">
            </el-table-column>
            <el-table-column label="详情" align="center">
              <template slot-scope="scope">
                <el-button @click="goGraph(scope.row)" type="text" size="small">查看</el-button>
              </template>
            </el-table-column>
            <el-table-column label="操作" align="center">
              <template slot-scope="scope">
                <el-button @click="goGraph(scope.row)" type="text" size="small">设为默认</el-button>
              </template>
            </el-table-column>
          </el-table>
        </el-tab-pane>
        <el-tab-pane label="APP通知模版设置" name="2">
          <div class="search_box">
            <el-row :gutter="20">
              <el-col :md="4">
                <el-input v-model="searchInpt" placeholder="输入ID/昵称/手机号" clearable></el-input>
              </el-col>
              <el-col :md="6">
                <el-button type="primary" @click="searchFeedbackData()" icon="el-icon-search" :loading="searchLoading" plain>搜索</el-button>
              </el-col>
              <el-col :md="6">
              </el-col>
              <el-col :md="8">
              </el-col>
            </el-row>
          </div>
          <el-table v-loading="tableloading" :data="messageTemplateData" highlight-current-row style="width: 100%">
            <el-table-column property="index" label="id" align="center" fixed>
            </el-table-column>
            <el-table-column property="templateName" label="模版名称" align="center" fixed>
            </el-table-column>
            <el-table-column property="templateContext" label="模版内容" align="center">
            </el-table-column>
            <el-table-column label="详情" align="center">
              <template slot-scope="scope">
                <el-button @click="goGraph(scope.row)" type="text" size="small">查看</el-button>
              </template>
            </el-table-column>
            <el-table-column label="操作" align="center">
              <template slot-scope="scope">
                <el-button @click="goGraph(scope.row)" type="text" size="small">设为默认</el-button>
              </template>
            </el-table-column>
          </el-table>
        </el-tab-pane>
      </el-tabs>

      <!-- <div class="Pagination" style="text-align: left;margin-top: 10px;">
        <el-pagination @size-change="pageSizeChange" @current-change="currentChange" :current-page="currentPage" :page-size="limit" layout="total, prev, pager, next" :total="count">
        </el-pagination>
      </div> -->
    </div>

  </div>
</template>

<script>
import breadCrumbs from "../components/breadCrumbs";
import {} from "@/api/getData";
import { ip1Conf } from "@/config/env";
import { formatDateTime } from "@/util/common";
export default {
  data() {
    return {
      count: 0,
      limit: 20,
      currentPage: 1,
      tableloading: false,
      searchInpt: "",
      searchLoading: false,
      messageTemplateData: [],
      PushTemplateData: [],
      messageTemplateActive: "1"
    };
  },
  components: {
    breadCrumbs
  },
  created() {},
  render: {},
  methods: {
    messageTemplateTabsClick() {}
  }
};
</script>

<style lang="less">
@import "../style/mixin";
.search-box {
  padding: 20px 0;
}
.sendMagin {
  width: 400px;
  margin: 0 auto;
}
.last {
  text-align: right;
}
</style>
